﻿<!doctype html>
<html>
<head>
<#include "/part_meta.ftl">
<title>订单列表-迈小众</title>
<link href="${st.resDomain}/css/style.css" rel="stylesheet">
<link href="${st.resDomain}/css/MC-base.css" rel="stylesheet">
<link href="${st.resDomain}/css/MC.css" rel="stylesheet">
<link href="${st.resDomain}/css/form-base.css" rel="stylesheet">
</head>

<body style="noprint">
<!--- header --->
<div id="header">
  <div class="main f_clear">
  	<div class="logo"><h2><@shiro.principal property="s_name" /></h2><span>您好！<@shiro.principal property="m_name" />， <a href="${st.domain}/member/logoutDo">退出</a>&nbsp;&nbsp;&nbsp;[ <a href="${st.shopDomain}/localSale/v1.1" target="_blank">进行线下销售</a> ]</span></div>
    <div class="f_right"><a href="${st.userDomain}">个人中心</a> <a href="${st.shopDomain}" class="selected">店铺管理</a><@shiro.hasRole name="FIRM"><a href="${st.firmDomain}">企业管理</a></@shiro.hasRole></div>
  </div>
</div>
<!--- header end--->
<!--topnav -->
<div id="topnav">
  <div class="main">
    <ul class="left">      
      
      <li class="selected"><a href="${st.shopDomain}/order/list?statuses=0">订单</a></li>
      <li><a href="${st.shopDomain}/storeGoods/list">商品</a></li>
      <li><a href="${st.shopDomain}/memberVip">会员</a></li>      
      <li><a href="${st.shopDomain}/store/edit">店铺</a></li>      
      <li><a href="${st.shopDomain}/goodsReport">数据</a></li>
    </ul>
  </div>
</div>
<!--topnav end-->
<div id="mainb">
  <div id="title">订单管理</div>
  <ul class="tab_menu">
    <li id="statusFilter_0"><a href="javascript:;">新订单</a></li>
    <li id="statusFilter_2"><a href="javascript:;">配送中</a></li>
    <li id="statusFilter_5"><a href="javascript:;">退货单</a></li>
    <li id="statusFilter_"><a href="javascript:;">全部</a></li>
  </ul>
  <div id="search" style="padding:10px 15px 0px 15px;">
    <div class="left">
      <form id="form" onsubmit="return $(this).showMsg('正在查询...', 'load', true);">
      <input type="hidden" id="statuses" name="statuses" value="${(order.statuses![])?join(',')}">
      <select name="timeType">
      	<option value="">-时间-</option>
      	<#list timeTypes as t>
      	<option value="${t.name2}" <#if timeType.name2 == t.name2 >selected</#if> >${t.text}</option>
      	</#list>
      </select>
      <#if (order.statuses![])?size == 0>
      <select name="isLocalSale">
      	<option value="">-来源-</option>
      	<option value="false" <#if order.isLocalSale?? && order.isLocalSale == false>selected</#if>>线上</option>
      	<option value="true"  <#if order.isLocalSale>selected</#if>>线下</option>
      </select>
      </#if>
      </form> 
      <a onclick="$('#form').submit();" class="btn3">筛选</a></div>
    <div class="right"><a id="printPickBt" class="btn2" style="float:left"><span id="print">捡物小票</span></a><a id="printBt" class="btn2" style="float:left;margin-left:10px;"><span id="print">配送小票</span></a></div>
  </div>
  <div id="ddgl">
    <table width="100%" border="0" cellspacing="1" cellpadding="0" class="dd">
      <tr>
        <th> <ul class="spth">
          <li class="n1"><span style="float:left;margin-left:5px;"><input name="selectAll" type="checkbox" /></span><span>订单信息</span></li>
          <li class="n2">商品</li>
          <li class="n3">&nbsp;</li>
          <li class="n4">单价</li>
          <li>数量</li>
        </ul></th>
        <th>买家</th>
        <th>订单金额</th>
        <th>状态</th>
        <th class="cz">操作</th>
      </tr>
      <#list list as o>
      <tr>
        <td colspan="6" class="bh"><ul>
          <li class="n1">
            <div style="display:none;" id="orderParams_${o.orderId}">{
            	"orderId": "${o.orderId}",
            	"storeName": "${o.store.name}",
            	"orderCode": "${o.orderCode}",
            	"status": "${o.status}",
            	"orderTime": "${o.orderTime?number_to_datetime}",
            	"realCost": "${o.realCost}",
            	"delivery": "${o.delivery}",
            	"consignee": "${o.consignee}",
            	"phone": "${o.phone}",
            	"address": "${o.address}",
            	"storePhone": "${o.store.phone}"
            }</div>
            <input type="checkbox" name="orderIds" value="${o.orderId}"/>
          </li>
          <li class="n2">订单号：<a href="#">${o.orderCode}</a></li>
          <li class="n3">成交时间：${o.orderTime?number_to_datetime}</li>
          <#if !o.isLocalSale>
          <li class="n4">收货人：${o.consignee}</li>
          <li>${o.phone}</li>
          <li>收货地址：${o.address}</li>
          </#if>
        </ul></td>
      </tr>
      <tr id="o_${o.orderId}">
        <td>
        <#list o.orderGoodses as g>
        <div style="display:none;" id="ogParams_${o.orderId}_${g.orderGoodsId}">{
        	"orderId": "${o.orderId}",
        	"name": "${g.name}",
        	"price": "${g.price}",
        	"buyCount": "${g.buyCount}",
        	"realCount": "${g.realCount}",
        	"buyUnit": "${g.buyUnit}",
        	"unit": "${g.unit}",
        	"realCost": "${g.realCost}"
        }</div>
        <ul class="spinfo" id="og_${o.orderId}_${g.barCode}_${g.orderGoodsId}">
          <li class="n1"><a href="${st.shopDomain}/storeGoods/edit?storeGoodsId=${g.storeGoodsId}" title="${g.name}" target="_blank"><img src="${st.resDomain}/images/goods_def.jpg" <#if g.pic??>data="${g.pic}"</#if>/></a></li>
          <li class="n2"><a href="${st.shopDomain}/storeGoods/edit?storeGoodsId=${g.storeGoodsId}" target="_blank">${g.name}</a></li>
          <li class="n3" its="t_og_price">${g.price}</li>
          <li class="n4">/${g.unit}</li>
          <li class="n3">
            <span its="t_og_realCount">${g.realCount}</span>${g.unit}
          </li>
          <li  class="n4" style="width:auto;"><#if !isLocalSale && g.buyUnit?? && g.buyUnit != g.unit>（${g.buyCount} ${g.buyUnit}）</#if></li>
        </ul>
        </#list>
        </td>
        <td>${o.memberByMemberId.name}</td>
        <td>￥<span its="t_o_realCost">${o.realCost?default(0.0)?string("0.#")}</span></td> <!-- 金额四舍五入保留一位小数 -->
        <td its="t_o_status">${statuses[o.status].storeText}</td>
        <td its="e_o_ctrl" class="cz"></td>
      </tr>
    </#list>
    </table>
    <div class="tabletj">
      <div class="left">
        <input name="selectAll" type="checkbox" />全选
      </div>
      <div id="page">
        ${pl.linkString}
      </div>
    </div>
  </div>
</div>
<form id="rectifyForm" onsubmit="return false;" style="position:fixed;top:0px; width:0px;height:0px;padding:0px;maring:0px;border:0px;">
  <input type="hidden" id="i_r_orderId">
  <input type="text" id="i_r_scanCode" style="width:0px;height:0px;padding:0px;maring:0px;border:0px;">
  <input type="submit" id="bt_r_submit" style="display:none;">
</form>
<!-- (ie兼容) 样式直接使用display:none 将无法打印iframe内容,打印的是顶层页面内容 -->
<iframe id="printframe" style="width:0px;height:0px;border:0px;padding:0px;margin:0px;" src="${st.shopDomain}/order/print/online"></iframe>
<!--footer-->
<div id="footer">Copyright© 迈小众 <span style="padding-left:30px;">客服QQ：<a target="_blank" href="http://wpa.qq.com/msgrd?v=3&uin=3101084438&site=qq&menu=yes" rel="nofollow"><img border="0" src="http://wpa.qq.com/pa?p=2:3101084438:50" alt="点击联系我们，QQ：3101084438" title="点击联系我们，QQ：3101084438"></a></span></div>
<!--footer end-->
<script data-main="${st.resDomain}/scripts/shop/order_list" src="${st.resDomain}/scripts/require.js"></script>
</body>
</html>
